/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * PanelModificarCargo.java
 *
 * Created on 9/04/2011, 03:28:42 PM
 */
package frontera.interfaz.panel;

import control.SIRHApp;
import control.comparaciones.ComparacionContenencia;
import control.filtros.FiltroCandidatosAspiracionCargo;
import control.filtros.FiltroEmpleadoCargo;
import entidad.Candidato;
import entidad.Cargo;
import entidad.Departamento;
import entidad.Empleado;
import entidad.Horario;
import entidad.HorarioDia;
import frontera.interfaz.panel.herramientas.PanelHerramientasBuscar;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.ArrayList;
import javax.swing.JComboBox;
import javax.swing.JOptionPane;

/**
 *
 * @author Sebastian
 */
public class PanelModificarCargo extends javax.swing.JPanel {

    /** Creates new form PanelModificarCargo */
    public PanelModificarCargo(Cargo modificarCargo) {

        departamentos = SIRHApp.getInstance().getSistema().getDepartamentos();
        iniciarArregloBox();

        inicializarBoxEstado(modificarCargo.getEstado());
        initComponents();
        inicializarVariables(modificarCargo);

    }

    private void inicializarVariables(Cargo modificarCargo) {

        String salarioBasico = modificarCargo.getSalarioBásico();
        salarioBasico = salarioBasico.replace(',', '.');

        fieldNombre.setText(modificarCargo.getNombre());
        fieldSalario.setText(salarioBasico);
        permisoActivo = modificarCargo.getNivelPermisos();
        boxPermisos.setSelectedItem(permisoActivo);
        boxDepartamento.setSelectedItem(modificarCargo.getDepartamento().getNombre());
        estadoActivo = modificarCargo.getEstado();
        cargo = modificarCargo;
        inicializarBoxEstado(modificarCargo.getEstado());
        inicializarHorario();


    }

    private void inicializarBoxEstado(String estado) {
        if (	"Ocupado".equals(estado)) {
            arregloBoxEstados = new String[4];
            arregloBoxEstados[0] = "Ocupado";
            arregloBoxEstados[1] = "Vacante";
            arregloBoxEstados[2] = "Bloqueado";
            arregloBoxEstados[3] = "En Proceso";
        }
        if (	"Vacante".equals(estado)) {
            arregloBoxEstados = new String[3];
            arregloBoxEstados[0] = "Vacante";
            arregloBoxEstados[1] = "En Proceso";
            arregloBoxEstados[2] = "Bloqueado";
        }
        if (	"En Proceso".equals(estado)) {
            arregloBoxEstados = new String[4];
            arregloBoxEstados[0] = "En Proceso";
            arregloBoxEstados[1] = "Ocupado";
            arregloBoxEstados[2] = "Bloqueado";
            arregloBoxEstados[3] = "Vacante";
        }
        if (	"Bloqueado".equals(estado)) {
            arregloBoxEstados = new String[3];
            arregloBoxEstados[0] = "Bloqueado";
            arregloBoxEstados[1] = "Vacante";
            arregloBoxEstados[2] = "En Proceso";
        }


    }

    private void inicializarHorario() {
        for (HorarioDia h : cargo.getHorario().getHorario()) {
            HorarioDia hd = horarioTemporal.getHorario().get(h.getIdDia());
            hd.setInicioJor(h.getInicioJor());
            hd.setFinJor(h.getFinJor());
            hd.setIdDia(h.getIdDia());
        }   
    }

    private void unificarHorario() {
        for (HorarioDia u : cargo.getHorario().getHorario()) {
            HorarioDia temp = horarioTemporal.getHorario().get(u.getIdDia());
            if (!u.equals(temp)) {
                u.setInicioJor(temp.getInicioJor());
                u.setFinJor(temp.getFinJor());
            }
        }
    }

    private void iniciarArregloBox() {
        arregloBox = new String[departamentos.size()];
        if (!departamentos.isEmpty()) {
            int i = 0;
            for (Departamento dep : departamentos) {
                arregloBox[i] = dep.getNombre();
                i++;
            }
            depActivo = departamentos.get(0);
        }
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * alway     * WARNING: Do NOT modify this code. The content of this method is
    s regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        iconoActualizar = new javax.swing.JLabel();
        titulo = new javax.swing.JLabel();
        panelDatosBasicos = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        labelNombre = new javax.swing.JLabel();
        fieldNombre = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        labelDepartamento = new javax.swing.JLabel();
        boxDepartamento = new JComboBox(arregloBox);
        jPanel4 = new javax.swing.JPanel();
        labelSalarioBasico = new javax.swing.JLabel();
        fieldSalario = new javax.swing.JTextField();
        jPanel5 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        boxEstado = new JComboBox(arregloBoxEstados);
        botonGuardar = new javax.swing.JButton();
        botonCancelar = new javax.swing.JButton();
        labelResultado = new javax.swing.JLabel();
        jPanel2 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        boxPermisos = new javax.swing.JComboBox();
        panelFallas = new javax.swing.JPanel();
        modificarHorarioB = new javax.swing.JButton();

        iconoActualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontera/recursos/UpdCargo.png"))); // NOI18N

        titulo.setFont(new java.awt.Font("Dialog", 1, 32));
        titulo.setText("Editando Cargo");

        panelDatosBasicos.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Básicos"));
        panelDatosBasicos.setLayout(new java.awt.GridLayout(2, 2));

        labelNombre.setText("Nombre");

        fieldNombre.setText("Valor Antiguo");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(labelNombre)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(fieldNombre, javax.swing.GroupLayout.DEFAULT_SIZE, 279, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelNombre)
                    .addComponent(fieldNombre, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(20, Short.MAX_VALUE))
        );

        panelDatosBasicos.add(jPanel1);

        labelDepartamento.setText("Departamento");

        boxDepartamento.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boxDepartamentoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(labelDepartamento)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(boxDepartamento, 0, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelDepartamento)
                    .addComponent(boxDepartamento, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(16, Short.MAX_VALUE))
        );

        panelDatosBasicos.add(jPanel3);

        labelSalarioBasico.setText("Salario Básico");

        fieldSalario.setText("Valor Antiguo");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(labelSalarioBasico)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(fieldSalario, javax.swing.GroupLayout.DEFAULT_SIZE, 257, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelSalarioBasico)
                    .addComponent(fieldSalario, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(21, Short.MAX_VALUE))
        );

        panelDatosBasicos.add(jPanel4);

        jLabel1.setText("Estado");

        boxEstado.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boxEstadoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(boxEstado, 0, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(boxEstado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(18, Short.MAX_VALUE))
        );

        panelDatosBasicos.add(jPanel5);

        botonGuardar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontera/recursos/Save.png"))); // NOI18N
        botonGuardar.setText("Guardar");
        botonGuardar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonGuardarActionPerformed(evt);
            }
        });

        botonCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontera/recursos/Cancelar.png"))); // NOI18N
        botonCancelar.setText("Cancelar");
        botonCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botonCancelarActionPerformed(evt);
            }
        });

        labelResultado.setText(" ");

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Nivel De Permisos"));

        jLabel4.setText("Tipo De Nivel De Permisos");

        boxPermisos.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Ninguno", "Gerente", "Reclutamiento", "Auxiliar", "Coordinador" }));
        boxPermisos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                boxPermisosActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel4)
                .addGap(18, 18, 18)
                .addComponent(boxPermisos, 0, 0, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(boxPermisos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(38, Short.MAX_VALUE))
        );

        panelFallas.setBorder(javax.swing.BorderFactory.createTitledBorder("Horario"));

        modificarHorarioB.setIcon(new javax.swing.ImageIcon(getClass().getResource("/frontera/recursos/scheduleSmall.png"))); // NOI18N
        modificarHorarioB.setText("Modificar");
        modificarHorarioB.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
        modificarHorarioB.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
        modificarHorarioB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                modificarHorarioBActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout panelFallasLayout = new javax.swing.GroupLayout(panelFallas);
        panelFallas.setLayout(panelFallasLayout);
        panelFallasLayout.setHorizontalGroup(
            panelFallasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelFallasLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(modificarHorarioB)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        panelFallasLayout.setVerticalGroup(
            panelFallasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(modificarHorarioB)
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(panelDatosBasicos, javax.swing.GroupLayout.DEFAULT_SIZE, 704, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(iconoActualizar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(titulo)
                            .addComponent(panelFallas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 333, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addComponent(botonGuardar)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(botonCancelar))
                    .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(labelResultado, javax.swing.GroupLayout.PREFERRED_SIZE, 659, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(iconoActualizar)
                    .addGroup(layout.createSequentialGroup()
                        .addComponent(titulo)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(panelFallas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(18, 18, 18)
                .addComponent(panelDatosBasicos, javax.swing.GroupLayout.PREFERRED_SIZE, 128, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(labelResultado, javax.swing.GroupLayout.PREFERRED_SIZE, 19, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(botonCancelar)
                    .addComponent(botonGuardar))
                .addContainerGap())
        );
    }// </editor-fold>//GEN-END:initComponents

    private void botonCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonCancelarActionPerformed
        SIRHApp.getInstance().getVentanaPrincipal().setPanelPersonalCargo(SIRHApp.getInstance().getVentanaPrincipal().getPanelCargos());
        ((PanelHerramientasBuscar<Cargo>) SIRHApp.getInstance().getFactoryInterfaz().getPanelCargos().getPanelHerramientas()).inicializarBusqueda();
        SIRHApp.getInstance().getVentanaPrincipal().getPanelCargos().actualizarLista(SIRHApp.getInstance().getSistema().getCargos());
    }//GEN-LAST:event_botonCancelarActionPerformed

    private void botonGuardarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botonGuardarActionPerformed

        String resultadoOperacion = SIRHApp.getInstance().getAdmCargos().actualizarCargo(
                cargo,                
                fieldNombre.getText(),
                fieldSalario.getText(),
                depActivo,
                (String) boxEstado.getSelectedItem(), 
                permisoActivo, 
                horarioTemporal);

        if (resultadoOperacion.equals("")) {

            unificarHorario();
            cargo.setHorario(horarioTemporal);
            SIRHApp.getInstance().getVentanaPrincipal().setPanelPersonalCargo(SIRHApp.getInstance().getVentanaPrincipal().getPanelCargos());
            ((PanelHerramientasBuscar<Cargo>) SIRHApp.getInstance().getFactoryInterfaz().getPanelCargos().getPanelHerramientas()).inicializarBusqueda();
            SIRHApp.getInstance().getVentanaPrincipal().getPanelCargos().actualizarLista(SIRHApp.getInstance().getSistema().getCargos());
        } else {
            labelResultado.setText(resultadoOperacion);
        }
    }//GEN-LAST:event_botonGuardarActionPerformed

    private void boxDepartamentoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boxDepartamentoActionPerformed
        if (!departamentos.isEmpty()) {
            JComboBox cb = (JComboBox) evt.getSource();
            int indice = cb.getSelectedIndex();
            depActivo = departamentos.get(indice);
        }
    }//GEN-LAST:event_boxDepartamentoActionPerformed

    private void modificarHorarioBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_modificarHorarioBActionPerformed
        PanelHorarioCargo panelHorario = new PanelHorarioCargo(fieldNombre.getText(), horarioTemporal, this);
        SIRHApp.getInstance().getVentanaPrincipal().setPanelPersonalCargo(panelHorario);
    }//GEN-LAST:event_modificarHorarioBActionPerformed

    private void boxPermisosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boxPermisosActionPerformed
        JComboBox cb = (JComboBox) evt.getSource();
        permisoActivo = (String) cb.getSelectedItem();
}//GEN-LAST:event_boxPermisosActionPerformed

    private void boxEstadoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_boxEstadoActionPerformed
        JComboBox cb = (JComboBox) evt.getSource();
        String nuevoEstado = (String) cb.getSelectedItem();
        // Si cambia el estado de Ocupado a Bloqueado, no debe haber empleados asociados a este cargo
        // o los empleados asociados deben estar Jubilados o Despedidos
        
    }//GEN-LAST:event_boxEstadoActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botonCancelar;
    private javax.swing.JButton botonGuardar;
    private javax.swing.JComboBox boxDepartamento;
    private javax.swing.JComboBox boxEstado;
    private javax.swing.JComboBox boxPermisos;
    private javax.swing.JTextField fieldNombre;
    private javax.swing.JTextField fieldSalario;
    private javax.swing.JLabel iconoActualizar;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JLabel labelDepartamento;
    private javax.swing.JLabel labelNombre;
    private javax.swing.JLabel labelResultado;
    private javax.swing.JLabel labelSalarioBasico;
    private javax.swing.JButton modificarHorarioB;
    private javax.swing.JPanel panelDatosBasicos;
    private javax.swing.JPanel panelFallas;
    private javax.swing.JLabel titulo;
    // End of variables declaration//GEN-END:variables
    private Cargo cargo;
    private Horario horarioTemporal = new Horario();
    private Departamento depActivo;
    private ArrayList<Departamento> departamentos;
    private String[] arregloBox;
    private String[] arregloBoxEstados;
    private String permisoActivo;
    private String estadoActivo;
}
